<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字符串翻转练习</title>
  <script src="../Vue.js"></script>

</head>
<body>
<div id="app">
  <h3>{{msg}}</h3>
  <input type="button" value="翻转按钮" @click="handreverse">
</div>

<script>
  new Vue({
    el : '#app' ,
    data : {
      msg:'abcd'
    },
    methods : {
      handreverse(){
        //注意别掉了括号里的‘’
        this.msg = this.msg.split('').reverse().join('')
      }
    }
  })
</script>
</body>
</html>
